package com.dkm.orproject.dkmoa.dao;

import com.dkm.orproject.dkmoa.domain.OaFlow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OaFlowMapper {
    int deleteByPrimaryKey(Long pkFlowId);

    int insert(OaFlow record);

    int insertSelective(OaFlow record);

    OaFlow selectByPrimaryKey(Long pkFlowId);

    int updateByPrimaryKeySelective(OaFlow record);

    int updateByPrimaryKey(OaFlow record);

    /**
     * 分页查询
     * @param flow
     * @param startTime
     * @param endTime
     * @return
     */
    List<OaFlow> findAll(@Param("flow")OaFlow flow,@Param("startDate") String startTime,@Param("endDate") String endTime);

    /**
     * 总行数
     * @param flow
     * @param startTime
     * @param endTime
     * @return
     */
    Long rowCount(@Param("flow")OaFlow flow,@Param("startDate") String startTime,@Param("endDate") String endTime);

    /**
     * 批量查询
     * @param list
     * @return
     */
    List<OaFlow> selectAll(@Param("list") List<Long> list);

    /**
     * 批量删除
     * @param list
     * @return
     */
    int deleteAll(@Param("list")List<Long> list);

    /**
     * 根据流程id查询人员id
     * @param auditNode
     * @return
     */
    List<Long> findPersonnelId(@Param("auditNode")Long auditNode);
}